package frobagroup.repositories.frontEnd;

import frobagroup.entities.frontEnd.ShoppingCart;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;
import java.util.Set;

/**
 * Created by Tinsley on 2018/5/22.
 */
public interface ShoppingCartRepository extends MongoRepository<ShoppingCart,String> {

    void deleteByIdIn(List<String> scIds);
    Page<ShoppingCart> findByIdIn(Set<String> ids, Pageable pageable);
    ShoppingCart findByPIdAndUIdAndSizeAndProductColor(String pId,String uId,String size,String productColor);
    List<ShoppingCart> findByUId(String uId);
    List<ShoppingCart> findByPId(String pId);
}
